package com.zlt.bkparking.keyGenerator;

import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

@Component
public class PermissionRidKeyGenerator implements KeyGenerator {
    @Override
    public Object generate(Object target, Method method, Object... params) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("permission:rid:");
        stringBuilder.append(params[0]);
        return stringBuilder.toString();
    }
}
